package com.scs.application.modules.sys.mapper;
import com.scs.application.modules.sys.entity.Label;
import com.scs.application.core.mapper.IBaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.HashMap;
public interface LabelMapper extends IBaseMapper<Label> {
    @Update("UPDATE sys_label SET content = #{content}, gmt_modified = now() WHERE code = #{code} AND version = #{version}")
    int saveLabelContent(@Param("code") String labelCode, @Param("version") String labelVersion, @Param("content") String labelContent);

    @Select("SELECT code, version, name, type, content, gmt_modified mversion FROM sys_label WHERE code = #{labelCode} AND version = #{labelVersion}")
    HashMap getLabelByCodeAndVersion(@Param("labelCode") String labelCode, @Param("labelVersion") String labelVersion);
}
